<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

return [
    // +----------------------------------------------------------------------
    // | 搴旂敤璁剧疆
    // +----------------------------------------------------------------------

    // 搴旂敤鍛藉悕绌洪棿
    'app_namespace'          => 'app',
    // 搴旂敤璋冭瘯妯″紡
    'app_debug'              => true,
    // 搴旂敤Trace
    'app_trace'              => false,
    // 搴旂敤妯″紡鐘舵��
    'app_status'             => '',
    // 鏄惁鏀寔澶氭ā鍧�
    'app_multi_module'       => true,
    // 鍏ュ彛鑷姩缁戝畾妯″潡
    'auto_bind_module'       => false,
    // 娉ㄥ唽鐨勬牴鍛藉悕绌洪棿
    'root_namespace'         => [],
    // 鎵╁睍鍑芥暟鏂囦欢
    'extra_file_list'        => [THINK_PATH . 'helper' . EXT],
    // 榛樿杈撳嚭绫诲瀷
    'default_return_type'    => 'html',
    // 榛樿AJAX 鏁版嵁杩斿洖鏍煎紡,鍙�塲son xml ...
    'default_ajax_return'    => 'json',
    // 榛樿JSONP鏍煎紡杩斿洖鐨勫鐞嗘柟娉�
    'default_jsonp_handler'  => 'jsonpReturn',
    // 榛樿JSONP澶勭悊鏂规硶
    'var_jsonp_handler'      => 'callback',
    // 榛樿鏃跺尯
    'default_timezone'       => 'PRC',
    // 鏄惁寮�鍚璇█
    'lang_switch_on'         => false,
    // 榛樿鍏ㄥ眬杩囨护鏂规硶 鐢ㄩ�楀彿鍒嗛殧澶氫釜
    'default_filter'         => '',
    // 榛樿璇█
    'default_lang'           => 'zh-cn',
    // 搴旂敤绫诲簱鍚庣紑
    'class_suffix'           => false,
    // 鎺у埗鍣ㄧ被鍚庣紑
    'controller_suffix'      => false,

    // +----------------------------------------------------------------------
    // | 妯″潡璁剧疆
    // +----------------------------------------------------------------------

    // 榛樿妯″潡鍚�
    'default_module'         => 'index',
    // 绂佹璁块棶妯″潡
    'deny_module_list'       => ['common'],
    // 榛樿鎺у埗鍣ㄥ悕
    'default_controller'     => 'Index',
    // 榛樿鎿嶄綔鍚�
    'default_action'         => 'index',
    // 榛樿楠岃瘉鍣�
    'default_validate'       => '',
    // 榛樿鐨勭┖鎺у埗鍣ㄥ悕
    'empty_controller'       => 'Error',
    // 鎿嶄綔鏂规硶鍚庣紑
    'action_suffix'          => '',
    // 鑷姩鎼滅储鎺у埗鍣�
    'controller_auto_search' => false,

    // +----------------------------------------------------------------------
    // | URL璁剧疆
    // +----------------------------------------------------------------------

    // PATHINFO鍙橀噺鍚� 鐢ㄤ簬鍏煎妯″紡
    'var_pathinfo'           => 's',
    // 鍏煎PATH_INFO鑾峰彇
    'pathinfo_fetch'         => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'],
    // pathinfo鍒嗛殧绗�
    'pathinfo_depr'          => '/',
    // URL浼潤鎬佸悗缂�
    'url_html_suffix'        => 'html',
    // URL鏅�氭柟寮忓弬鏁� 鐢ㄤ簬鑷姩鐢熸垚
    'url_common_param'       => false,
    // URL鍙傛暟鏂瑰紡 0 鎸夊悕绉版垚瀵硅В鏋� 1 鎸夐『搴忚В鏋�
    'url_param_type'         => 0,
    // 鏄惁寮�鍚矾鐢�
    'url_route_on'           => true,
    // 璺敱浣跨敤瀹屾暣鍖归厤
    'route_complete_match'   => false,
    // 璺敱閰嶇疆鏂囦欢锛堟敮鎸侀厤缃涓級
    'route_config_file'      => ['route'],
    // 鏄惁寮哄埗浣跨敤璺敱
    'url_route_must'         => false,
    // 鍩熷悕閮ㄧ讲
    'url_domain_deploy'      => false,
    // 鍩熷悕鏍癸紝濡倀hinkphp.cn
    'url_domain_root'        => '',
    // 鏄惁鑷姩杞崲URL涓殑鎺у埗鍣ㄥ拰鎿嶄綔鍚�
    'url_convert'            => true,
    // 榛樿鐨勮闂帶鍒跺櫒灞�
    'url_controller_layer'   => 'controller',
    // 琛ㄥ崟璇锋眰绫诲瀷浼鍙橀噺
    'var_method'             => '_method',

    // +----------------------------------------------------------------------
    // | 妯℃澘璁剧疆
    // +----------------------------------------------------------------------

    'template'               => [
        // 妯℃澘寮曟搸绫诲瀷 鏀寔 php think 鏀寔鎵╁睍
        'type'         => 'Think',
        // 妯℃澘璺緞
        'view_path'    => '',
        // 妯℃澘鍚庣紑
        'view_suffix'  => 'php',
        // 妯℃澘鏂囦欢鍚嶅垎闅旂
        'view_depr'    => DS,
        // 妯℃澘寮曟搸鏅�氭爣绛惧紑濮嬫爣璁�
        'tpl_begin'    => '{',
        // 妯℃澘寮曟搸鏅�氭爣绛剧粨鏉熸爣璁�
        'tpl_end'      => '}',
        // 鏍囩搴撴爣绛惧紑濮嬫爣璁�
        'taglib_begin' => '{',
        // 鏍囩搴撴爣绛剧粨鏉熸爣璁�
        'taglib_end'   => '}',
    ],

    // 瑙嗗浘杈撳嚭瀛楃涓插唴瀹规浛鎹�
    'view_replace_str'       => [],
    // 榛樿璺宠浆椤甸潰瀵瑰簲鐨勬ā鏉挎枃浠�
    'dispatch_success_tmpl'  => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl',
    'dispatch_error_tmpl'    => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl',

    // +----------------------------------------------------------------------
    // | 寮傚父鍙婇敊璇缃�
    // +----------------------------------------------------------------------

    // 寮傚父椤甸潰鐨勬ā鏉挎枃浠�
    'exception_tmpl'         => THINK_PATH . 'tpl' . DS . 'think_exception.tpl',

    // 閿欒鏄剧ず淇℃伅,闈炶皟璇曟ā寮忔湁鏁�
    'error_message'          => '椤甸潰閿欒锛佽绋嶅悗鍐嶈瘯锝�',
    // 鏄剧ず閿欒淇℃伅
    'show_error_msg'         => false,
    // 寮傚父澶勭悊handle绫� 鐣欑┖浣跨敤 \think\exception\Handle
    'exception_handle'       => '',

    // +----------------------------------------------------------------------
    // | 鏃ュ織璁剧疆
    // +----------------------------------------------------------------------

    'log'                    => [
        // 鏃ュ織璁板綍鏂瑰紡锛屽唴缃� file socket 鏀寔鎵╁睍
        'type'  => 'File',
        // 鏃ュ織淇濆瓨鐩綍
        'path'  => LOG_PATH,
        // 鏃ュ織璁板綍绾у埆
        'level' => [],
    ],

    // +----------------------------------------------------------------------
    // | Trace璁剧疆 寮�鍚� app_trace 鍚� 鏈夋晥
    // +----------------------------------------------------------------------
    'trace'                  => [
        // 鍐呯疆Html Console 鏀寔鎵╁睍
        'type' => 'Html',
    ],

    // +----------------------------------------------------------------------
    // | 缂撳瓨璁剧疆
    // +----------------------------------------------------------------------

    'cache'                  => [
        // 椹卞姩鏂瑰紡
        'type'   => 'File',
        // 缂撳瓨淇濆瓨鐩綍
        'path'   => CACHE_PATH,
        // 缂撳瓨鍓嶇紑
        'prefix' => '',
        // 缂撳瓨鏈夋晥鏈� 0琛ㄧず姘镐箙缂撳瓨
        'expire' => 0,
    ],

    // +----------------------------------------------------------------------
    // | 浼氳瘽璁剧疆
    // +----------------------------------------------------------------------

    'session'                => [
        'id'             => '',
        // SESSION_ID鐨勬彁浜ゅ彉閲�,瑙ｅ喅flash涓婁紶璺ㄥ煙
        'var_session_id' => '',
        // SESSION 鍓嶇紑
        'prefix'         => 'think',
        // 椹卞姩鏂瑰紡 鏀寔redis memcache memcached
        'type'           => '',
        // 鏄惁鑷姩寮�鍚� SESSION
        'auto_start'     => true,
    ],

    // +----------------------------------------------------------------------
    // | Cookie璁剧疆
    // +----------------------------------------------------------------------
    'cookie'                 => [
        // cookie 鍚嶇О鍓嶇紑
        'prefix'    => '',
        // cookie 淇濆瓨鏃堕棿
        'expire'    => 0,
        // cookie 淇濆瓨璺緞
        'path'      => '/',
        // cookie 鏈夋晥鍩熷悕
        'domain'    => '',
        //  cookie 鍚敤瀹夊叏浼犺緭
        'secure'    => false,
        // httponly璁剧疆
        'httponly'  => '',
        // 鏄惁浣跨敤 setcookie
        'setcookie' => true,
    ],

    //鍒嗛〉閰嶇疆
    'paginate'               => [
        'type'      => 'bootstrap',
        'var_page'  => 'page',
        'list_rows' => 15,
    ],
];
